<div class='fui-page  fui-page-current'>
	<div class='fui-content'>
		<div class="topbg" style="position: relative;width:100%;background: {{main.syscolor || '#7c1cc9'}};height:3.3rem">
			<div class="fui-cell-title bold" style="padding-top:0.8rem;color:#fff">欢迎注册使用</div>
		</div>
		<div class="jy-content" style="margin-top:-1.5rem">
		<div class="fui-cell-group">
			<div class="fui-cell">
				<div class="fui-cell-info"><input type="text" class='fui-input' placeholder="请输入企业名称" ng-model="pagedata.item.title" /></div>
			</div>
			<div class="fui-cell">
				<div class="fui-cell-info"><input type="text" class='fui-input' placeholder="请输入企业描述" ng-model="pagedata.item.desc" /></div>
			</div>
			<div class="fui-cell">
				<div class="fui-cell-info"><input type="text" class='fui-input' placeholder="请输入社会信用代码" ng-model="pagedata.item.codesn" /></div>
			</div>
			<div class="fui-cell">
				<div class="fui-cell-info"><input type="text" class='fui-input' placeholder="请输入联系人姓名" ng-model="pagedata.item.name" /></div>
			</div>
			<div class="fui-cell">
				<div class="fui-cell-info"><input type="text" class='fui-input' placeholder="请输入联系人电话" ng-model="pagedata.item.mobile" /></div>
			</div>
			<div class="fui-cell">
				<div class="fui-cell-label" style="width:auto">企业性质</div>
				<div class="fui-cell-info">
				<select ng-model="pagedata.item.type" class="form-control tpl-province">
					<option value="" selected="selected">请选择</option>
					<option ng-repeat="(value,data) in pagedata.merch_type" value="1" ng-selected="pagedata.item.type==value">{{data}}</option>
				</select>
				</div>
			</div>
			<div class="fui-cell">
				<div class="fui-cell-label" style="width:4.2rem">所在城市</div>		
							<div class="fui-cell-label" style="width:28%">
								<select ng-model="pagedata.item.pcd.province" class="form-control tpl-province">
								<option value="" selected="selected">省份</option>
								<option ng-repeat="(value,data) in pagedata.province" value="{{value}}" ng-selected="pagedata.item.pcd.province==value">{{value}}</option>
								</select>
							</div>
							<div class="fui-cell-label" style="width:28%">
								<select ng-model="pagedata.item.pcd.city" class="form-control tpl-city">
								<option value="" selected="selected">城市</option>
								<option ng-repeat="(value,data) in pagedata.province[pagedata.item.pcd.province]" value="{{value}}" ng-selected="pagedata.item.pcd.city==value">{{value}}</option>
								</select>
							</div>
							<div class="fui-cell-label" style="width:28%">
								<select ng-model="pagedata.item.pcd.district" class="form-control tpl-district">
								<option value="" selected="selected">区县</option>
								<option ng-repeat="(value,data) in pagedata.province[pagedata.item.pcd.province][pagedata.item.pcd.city]" value="{{value}}" ng-selected="pagedata.item.pcd.district==value">{{value}}</option>
								</select>
							</div>
							<div class="fui-cell-label" style="width:28%">
								<select ng-model="pagedata.item.pcd.street" class="form-control tpl-district">
								<option value="" selected="selected">街道</option>
								<option ng-repeat="value in pagedata.province[pagedata.item.pcd.province][pagedata.item.pcd.city][pagedata.item.pcd.district]" value="{{value}}" ng-selected="pagedata.item.pcd.street==value">{{value}}</option>
								</select>
							</div>
				
			</div>
			<div class="fui-cell">
				<div class="fui-cell-info"><input type="text" class='fui-input' placeholder="请输入详细地址" ng-model="pagedata.item.address" /></div>
			</div>
			<div class="fui-cell">
                <div class="fui-cell-label">营业执照</div>
                <div class="fui-cell-info">
                    <div class="fui-list jump">
								<a class="fui-list-media" ng-if="pagedata.item.codeimg">
									<img class="round" src="{{tomedia(pagedata.item.codeimg) || '../core/resource/images/nopic.jpg'}}" />
								</a>
								<a class="fui-list-media weui_uploader_input_wrp">
									<input class="weui_uploader_input" ng-click="image(pagedata.item,'codeimg')" accept="image/jpg,image/jpeg,image/png,image/gif" multiple="">
								</a>
					</div>
				</div>
            </div>
			<div class="fui-cell">
                <div class="fui-cell-label">企业LOGO</div>
                <div class="fui-cell-info">
                    <div class="fui-list jump">
								<a class="fui-list-media" ng-if="pagedata.item.logo">
									<img class="round" src="{{tomedia(pagedata.item.logo) || '../core/resource/images/nopic.jpg'}}" />
								</a>
								<a class="fui-list-media weui_uploader_input_wrp">
									<input class="weui_uploader_input" ng-click="image(pagedata.item,'logo')" accept="image/jpg,image/jpeg,image/png,image/gif" multiple="">
								</a>
					</div>
				</div>
            </div>
		</div>
		<a href='javascript:;' ng-click="post(pagedata.item,'/merch.info/post/')" class='btn btn-success block'>确认提交</a>
	</div>
	</div>
</div>
<script>
window.scope.location(function(re){
	var pcd = scope.pagedata.item.pcd
	if(!pcd || pcd ==''){
		scope.pagedata.item.pcd.province = re.addressComponents.province
		scope.pagedata.item.pcd.city = re.addressComponents.city
		scope.pagedata.item.pcd.district = re.addressComponents.district
		scope.$evalAsync();
	}
});
scope.pagedata.getprovince=function(){
	scope.get('core/member.set/getprovince/',function(res){
		scope.pagedata.province=res.province;
		scope.$evalAsync();
	});
}
scope.pagedata.getprovince();
</script>
